﻿using DatabaseModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LogBookImporter.Repository {
    public class LogBookEntryRepository {
        public int InsertLogBookEntries(List<LogBookEntry> logBookEntries) {
            using(ElliContext context = new ElliContext()) {
                foreach(LogBookEntry logBookEntry in logBookEntries) {
                    context.LogBookEntries.Add(logBookEntry);
                }
                context.SaveChanges();
                return logBookEntries.Count;
            }
        }

        public void InsertLogBookEntry(LogBookEntry logBookEntry) {
            throw new NotImplementedException();
        }
    }
}
